.databaseSearchModal {
  :global {
    .ant-modal-content {
      padding: 0px;
      box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
        0 9px 28px 8px rgba(0, 0, 0, 0.05);
      border-radius: 6px;
      .ant-modal-header {
        padding: 8px 12px;
        border-radius: 8px 8px 0 0;
        margin-bottom: 0px;
        border-bottom: 1px solid var(--neutral-grey3-color);
        .ant-modal-title {
          font-size: 12px;
          line-height: 20px;
        }
      }
      .ant-modal-body {
        padding: 0;
      }
    }
  }
  .asyncingContent {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .asycLoading {
    height: 40px;
    width: 40px;
    font-size: 40px;
    cursor: pointer;
    color: var(--brand-blue6-color);
  }
  .asyncText {
    margin-top: 6px;
    color: var(--text-color-secondary);
    font-size: 12px;
  }
  .center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .searchInfo {
    color: var(--text-color-secondary);
    font-size: 12px;
    line-height: 20px;
    padding: 4px 12px;
  }
  .title {
    color: rgba(0, 0, 0, 0.65);
    font-weight: 400;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .selectInfo {
      flex-grow: 1;
      display: flex;
      align-items: center;
      .selectedDatabase {
        color: var(--code-normal-color);
        flex-shrink: 0;
        padding-top: 4px;
        display: flex;
        align-items: center;
        &:hover {
          color: var(--brand-blue6-color);
          cursor: pointer;
        }
      }
      .selectTitle {
        padding-left: 4px;
        max-width: 120px;
        text-overflow: ellipsis;
        text-wrap: nowrap;
        overflow: hidden;
        display: inline-block;
        vertical-align: top;
      }
      .selectIcon {
        font-size: 8px;
        padding-right: 4px;
      }
      .selectDivider {
        padding: 0 4px;
      }
      .selectInput {
        flex-grow: 2;
        padding-top: 4px;
        :global {
          .ant-input {
            border: none;
            height: 20px;
            padding: 0;
            background-color: transparent;
            &:active,
            &:focus {
              box-shadow: none;
            }
          }
        }
      }
    }
    .searchIcon {
      font-size: 12.5px;
    }
  }
  .content {
    padding: 4px 0;
    max-height: 344px;
    min-height: 300px;
    font-size: 12px;
    overflow: auto;
    .positioninContent {
      border-bottom: 1px solid var(--neutral-grey3-color);
      padding-bottom: 4px;
    }
    .databaseItem,
    .databaseItemActive {
      display: flex;
      align-items: center;
      height: 28px;
      padding: 0 12px;
      cursor: pointer;
      justify-content: space-between;
      width: 100%;

      &:hover {
        background-color: var(--hover-color);
      }
      .nameContent {
        display: flex;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 450px;
        align-items: center;
        .nameInfo {
          margin-left: 6px;
          max-width: 250px;
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
        }
      }
      .itemButton {
        display: none;
      }
      &:hover .itemButton {
        display: inline-block;
      }

      .subInfo {
        color: var(--icon-color-disable);
        text-overflow: ellipsis;
        overflow: hidden;
        flex: 1;
        text-wrap: nowrap;
        margin-left: 6px;
        display: flex;
        align-items: center;
        .dataSouceName {
          flex: 1;
          margin-left: 4px;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
    .databaseItemActive {
      background-color: var(--hover-color);
    }
  }
  .modalTabs {
    :global {
      .ant-tabs-tab {
        margin: 0 6px;
      }
      .ant-tabs-nav-more {
        padding: 10px 7px;
      }
    }
    .objectlistBox {
      max-height: 66px;
      overflow: auto;
      min-height: 302px;
      margin-top: 6px;
      .objectTypeBox {
        .objectTypeTitle {
          font-weight: 500;
          padding: 0px 12px 8px 12px;
          line-height: 20px;
        }
        .objectTypeItem {
          padding: 4px 12px;
          display: flex;
          justify-content: space-between;
          flex-wrap: nowrap;
          overflow: hidden;
          &:hover {
            background-color: var(--hover-color);
            cursor: pointer;
          }
          .itemButton {
            display: none !important;
          }
          &:hover .itemButton {
            display: inline-block !important;
          }
        }
        .objectTypeItemMore {
          padding: 0px 12px;
          height: 20px;
        }
      }
      .objectItem {
        display: flex;
        justify-content: space-between;
        padding: 6px 12px;
        &:hover {
          background-color: var(--hover-color);
          cursor: pointer;
        }
        .itemButton {
          display: none !important;
        }
        &:hover .itemButton {
          display: inline-block !important;
        }
      }
    }
    .objectlistBoxEmpty {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 302px;
      :global {
        .ant-empty-image {
          height: 48px;
          .ant-empty-img-default {
            width: 54px;
            height: 48px;
          }
        }
        .ant-empty-description {
          color: var(--text-color-hint);
        }
      }
    }
  }
}
.objectSearchPopup {
  :global {
    .ant-tabs-dropdown-menu {
      left: auto;
      right: 0;
      position: absolute;
    }
  }
}

.withPanel {
  :global {
    .ant-modal-content {
      .ant-modal-header {
        padding: 8px 12px;
        border-radius: 8px 8px 0 0;
        margin-bottom: 0px;
        border-bottom: 1px solid var(--neutral-grey3-color);
      }
    }
  }
}
